app.service('z-attendance-s', [
		'$rootScope',
		'$z-http',
		'ZModel',
		function($rootScope, $http, ZModel) {
			var service = {
					getAttendanceList : function(data,success,fault) {
						$http.post("attendance/getAttendanceList.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					getAttendanceListById : function(data,success,fault) {
						$http.post("attendance/getAttendanceListById.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					getAttendanceURL : function(data,success,fault) {
						$http.post("attendance/getAttendanceURL.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					saveRetroactive : function(data,success,fault) {
						$http.post("retroactive/saveRetroactive.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					getIsAbleRetroactive : function(data,success,fault) {
						$http.post("retroactiveTimes/getIsAbleRetroactive.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					getAttendanceCount : function(data,success,fault) {
						$http.post("attendance/getAttendanceCount.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					getAttendanceData : function(data,success,fault) {
						$http.post("attendance/getAttendanceData.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					getDictionaryListBydicCls : function(data,success,fault) {
						$http.post(
								"common/getDictionaryListBydicCls.do",
								$.param(data),
								{headers: {
									   'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
								 }}
								).success(function(data) {
							success(data.success);
		  				}).error(function(data) {
		  					if(fault) {
		  						fault(data);
		  					}
		  				});
					},
					getApprovalRecordByAttendanceId : function(data,success,fault) {
						$http.post("requestApproval/getApprovalRecordByAttendanceId.do",
							$.param(data),
							{headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}}
							).success(function(data) {
								success(data.success);
			  				}).error(function(data) {
			  					if(fault) {
			  						fault(data);
			  				}
		  				});
					},
					getAttendanceRight : function(data,success,fault) {
						$http.post("attendance/getAttendanceRight.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					retractAttednance : function(data,success,fault) {
						$http.post("attendance/retractAttednance.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					resetAttendance : function(data,success,fault) {
						$http.post("attendance/resetAttendance.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					saveOnceRetroactive : function(data,success,fault) {
						$http.post("retroactive/saveOnceRetroactive.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					getCheckinoutMorningList : function(data,success,fault) {
						$http.post("checkinoutMorning/getCheckinoutMorningList.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
	                saveAcrossRetroactive: function (data, success, fault) {
	                    $http.post("retroactive/saveAcrossRetroactive.do",data)
	                        .success(function(data) {
	                            success(data.success);
	                        }).error(function(data) {
	                        fault(data);
	                    });
	                },
	                getRetroactives: function (data, success, fault) {
	                    $http.post("retroactive/getRetroactives.do",data)
	                        .success(function(data) {
	                            success(data.success);
	                        }).error(function(data) {
	                        fault(data);
	                    });
	                },
	                getAttendanceTimeByDate : function(data,success,fault) {
						$http.post("attendance/getAttendanceTimeByDate.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					}
			};
			return service;
		} ]);